import matplotlib.pyplot as plt

input_values = [1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5]
squares = [1, 2.25, 4, 6.25, 9, 12.25, 16, 20.25, 25]

plt.style.use('seaborn-v0_8')

# print("支持的样式：", plt.style.available)
'''
支持的样式：
'Solarize_Light2', '_classic_test_patch', '_mpl-gallery', '_mpl-gallery-nogrid', 
'bmh', 'classic', 'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale', 
'petroff10', 'seaborn-v0_8', 'seaborn-v0_8-bright', 'seaborn-v0_8-colorblind', 
'seaborn-v0_8-dark', 'seaborn-v0_8-dark-palette', 'seaborn-v0_8-darkgrid', 'seaborn-v0_8-deep', 
'seaborn-v0_8-muted', 'seaborn-v0_8-notebook', 'seaborn-v0_8-paper', 'seaborn-v0_8-pastel', 
'seaborn-v0_8-poster', 'seaborn-v0_8-talk', 'seaborn-v0_8-ticks', 'seaborn-v0_8-white', 
'seaborn-v0_8-whitegrid', 'tableau-colorblind10'
'''

fig, ax = plt.subplots(
    nrows=1, ncols=1, # 子图的行数、列数
    sharex = False, # 共享x轴
    sharey = False, # 共享y轴
    squeeze = True, # 压缩维度
    width_ratios = None,
    height_ratios = None,
    subplot_kw = None,
    gridspec_kw = None
)

ax.plot(input_values, squares, color='red', linewidth=3)

# 设置图题并给坐标轴加上标签
ax.set_title("Square Numbers", fontsize=24)
ax.set_xlabel("Value", fontsize=14)
ax.set_ylabel("Square of Value", fontsize=14)
# 设置刻度标记的样式
ax.tick_params(labelsize=14)

plt.show()